<?php

class LogLevel {
	
	public static $TRACE;
	public static $DEBUG;
	public static $INFO;
	public static $WARN;
	public static $ERROR;
	public static $FATAL;
	
	
	private $intValue;
	private $stringValue;
	
	private function LogLevel($intValue, $stringValue) {
		$this->intValue = $intValue;
		$this->stringValue = $stringValue;
	}
	
	public function getStringValue() {
		return $this->stringValue;
	}
	
	static function initLevels() {
		self::$TRACE = new LogLevel(1, 'TRACE');
		self::$DEBUG = new LogLevel(2, 'DEBUG');
		self::$INFO  = new LogLevel(3, 'INFO');
		self::$WARN  = new LogLevel(4, 'WARN');
		self::$ERROR = new LogLevel(5, 'ERROR');
		self::$FATAL = new LogLevel(6, 'FATAL');
	}
	
	public function isBelow(LogLevel $that) {
		return $this->intValue < $that->intValue;
	}
}

?>